package com.fuyc.project.tools.utils;

import java.lang.reflect.Method;

import com.fuyc.project.tools.annotation.FucyMainMethodTag;

public class FuycMainMethodTagUtils {
	
	/**
	 * 根据类全面执行入口方法
	 * @throws Exception 
	 * */
	public static Object executeMethodByTag(String fullClassName,Object param) throws Exception {
		Class<?> clazz = ParseAnnotationUtils.getObjectByFullClassName(fullClassName);
		Method method = ParseAnnotationUtils.getMethodByAnnotion(clazz, FucyMainMethodTag.class);
		Object result = ParseAnnotationUtils.executeAnnotionMethod(clazz.newInstance(), method, param);
		return result;
	}

}
